//
//  YCViewController.m
//  YCPod
//
//  Created by shenglong on 12/03/2015.
//  Copyright (c) 2015 shenglong. All rights reserved.
//

#import "YCViewController.h"
#import <YCPod/YCPod.h>
#import <YCPod/CommUtls.h>
#import <YCPod/CommUtls.h>

@interface YCViewController ()

@end

@implementation YCViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    self.view.backgroundColor = [UIColor whiteColor];
    
////    DLMenuScrollView *scrollView = [[DLMenuScrollView alloc] initWithFrame:self.view.bounds
////                                                                 nameArray:@[@"中华会计网校",@"中华人民共和国",@"中国",@"网校",@"中华人民共和国",@"中国",@"网校",@"中华人民共和国",@"中国",@"网校"]
////                                                                 navHeight:50
////                                                               normalIndex:0
////                                                               normalColor:[UIColor blackColor]
////                                                             selectedColor:[UIColor redColor]
////                                                                      font:[UIFont systemFontOfSize:16]
////                                                               currentView:^UIView *(id x, NSInteger index, CGRect rect) {
////                                                                   UILabel *label = [[UILabel alloc] initWithFrame:rect];
////                                                                   label.text = x;
////                                                                   return label;
////                                                               }];
////    [self.view addSubview:scrollView];
////    
////    self.view.backgroundColor = YColor(@"#fff733");
////    CLog(@"1==%@",[CommUtls changeUIColorToRGB:self.view.backgroundColor]);
////    CLog(@"2==%@",[CommUtls getSelectedColor:[CommUtls changeUIColorToRGB:self.view.backgroundColor]]);
//    
//    //获得应用程序沙盒的Documents目录，官方推荐数据文件保存在此
//    NSArray *path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
//    NSString* doc_path = [path objectAtIndex:0];
//    
//    UIImage *image = [CommUtls createImageFromView:self.view scrollFull:NO];
//    NSFileManager *fm = [NSFileManager defaultManager];
//    NSString* _filename = [doc_path stringByAppendingPathComponent:@"img"];
//    //NSString* new_folder = [doc_path stringByAppendingPathComponent:@"test"];
//    //创建目录
//    //[fm createDirectoryAtPath:new_folder withIntermediateDirectories:YES attributes:nil error:nil];
//    [fm createFileAtPath:_filename contents:UIImageJPEGRepresentation(image, 1) attributes:nil];
//    
////    [CommUtls mimeTypeForFileAtPath]
}

@end
